import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule,ViewController } from 'ionic-angular';
import { HttpModule } from '@angular/http';
import { IonJPushModule } from 'ionic2-jpush';
import { IonicStorageModule } from '@ionic/storage';

import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { ListPage } from '../pages/list/list';
import { ModifyAvatar } from '../pages/modifyavatar/modifyavatar';
import { ModifyPassword } from '../pages/modifypassword/modifypassword';
import { CreateTask } from '../pages/createtask/createtask';
import { TaskDetail } from '../pages/taskdetail/taskdetail';
import { FilterPage } from '../pages/filter/filter';
import { LoginPage } from '../pages/login/login';

import { HttpService } from '../providers/HttpService';
import { ApiService } from '../providers/ApiService';

import { StatusBar } from '@ionic-native/status-bar';
import { Camera } from '@ionic-native/camera';
import { File } from '@ionic-native/file';
import { JPushService } from 'ionic2-jpush';
import { NativeService } from '../providers/NativeService';
import { EditorService } from '../providers/EditorService';
import { SplashScreen } from '@ionic-native/splash-screen';

@NgModule({
  declarations: [
    MyApp,
    HomePage,
    ListPage,
    ModifyPassword,
    ModifyAvatar,
    CreateTask,
    TaskDetail,
    LoginPage,
    FilterPage,
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp,{
      backButtonText: ''//配置返回按钮文字
    }),
    IonicStorageModule.forRoot(),
    HttpModule,
    IonJPushModule,
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage,
    ListPage,
    ModifyPassword,
    ModifyAvatar,
    CreateTask,
    TaskDetail,
    LoginPage,
    FilterPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    Camera,
    HttpService,
    ApiService,
    NativeService,
    EditorService,
    File,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {}
